"""
短连接 客户端
"""
from socket import *

ADDR = ("127.0.0.1",8888)

# 有数据发送-》连接
while True:
    data = input(">>")
    if not data:
        break
    sock = socket()
    sock.connect(ADDR)
    sock.send(data.encode())
    data = sock.recv(128)
    print(data.decode())
    sock.close()

